package com.arron.factory;

import com.arron.factory.Shape.ShapeFactory;
/* 工厂模式
* */
public class Main {

    public static void main(String[] args) {
        ShapeFactory shapeFactory=new ShapeFactory();
        IShape shape1=shapeFactory.getShape("circle");
        shape1.draw();

        IShape shape2=shapeFactory.getShape("square");
        shape2.draw();

        IShape shape3=shapeFactory.getShape("rectangle");
        shape3.draw();
    }
}
